<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!--

 This library is part of OpenCms -
 the Open Source Content Management System

 Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com)

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 Lesser General Public License for more details.

 For further information about Alkacon Software GmbH & Co. KG, please see the
 company website: http://www.alkacon.com

 For further information about OpenCms, please see the
 project website: http://www.opencms.org

 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

-->
</head>
<body bgcolor="white">

Provides low-level JSP integration funtionality for OpenCms, 
also implements the FlexCache, a declarative parameter-based cache.<p>

<h1>How the JSP integration is done:</h1>

In OpenCms all resources are residing in the OpenCms Database, the so 
called "Virtual File System" or VFS.
However, all JSP engines available read the JSP code from a file in the local file system.
The option to re-write a JSP engine so that it can read from the VFS would limit OpenCms
to running with this JSP engine only, which was not a choice.
So the approach that was taken is to dump the contents of the OpenCms JSP page from the VFS 
to the "real" file system
and then dispatch to the standard JSP engine.<p>

Here is a top-level description of how this works:
<ol>
<li>OpenCms gets the request through the {@link org.opencms.main.OpenCmsServlet}
<li>The requested resource is identified as a JSP page (resource type {@link org.opencms.file.types.CmsResourceTypeJsp})
<li>The JSP loader is started up with the resource manager {@link org.opencms.loader.CmsResourceManager}
<li>The JSP loader implements an additional interface: {@link org.opencms.loader.I_CmsResourceLoader}
<li>A resource loader is a new interface that was introduced with the FLEX release. The main
difference is that the original request / response is wrapped using a Servlet standard
{@link javax.servlet.http.HttpServletRequestWrapper} / {@link javax.servlet.http.HttpServletResponseWrapper}.
<li>On the first call to a page, the file contents of the JSP page are read from the OpenCms VFS
using the {@link org.opencms.file.CmsObject}
<li>The contents of the page are written to the "real" file system of the server,
in the default configuration to the directories <code>{WEBAPP-PATH}/opencms/WEB-INF/jsp/online</code> or
<code>{WEBAPP-PATH}/opencms/WEB-INF/jsp/offline</code> (depending if the request was for the online or the offline
version of the page). The directory used can be configured in <code>opencms.properties</code>.
<li>After the page is written to the "real" FS, the loader dispatches to the standard JSP mechanism with a simple
<code>include()</code> call.
<li>The standard JSP mechanim will handle the JSP and deliver the output through the wrapped request / response
back to OpenCms.
<li>OpenCms will then deliver the contents back to the user.
</ol>

<!-- Put @see and @since tags down here. -->

@since 6.0.0 

@see org.opencms.flex.CmsFlexCache
@see org.opencms.flex.CmsFlexCacheEntry
@see org.opencms.flex.CmsFlexCacheKey

</body>
</html>
